package eg;

public class code2 {
    public static void main(String[] args) {
        //求全部水仙花数
        for (int i =100; i <1000 ; i++) {
            int g = i % 10;
            int s = i / 10 % 10;
            int b = i / 100;
            if (g * g * g + s * s * s + b * b * b == i) {
                System.out.println(i + "是水仙花数");
            }
        }
    }
}
